#include <bits/stdc++.h>

using namespace std;
typedef long long LL;
const LL maxn=1000000;
LL prime_num[maxn],prime_cnt=0;
bitset<maxn> is_prime;
void eulurSeive(LL n)
{
    is_prime.set();
    is_prime[0]=0,is_prime[1]=0;
    for (LL i=2;i<=n ;++i )
    {
        if (is_prime[i])
        {
            prime_num[++prime_cnt]=i;
        }
        for (LL j=1;j<=prime_cnt&&i*prime_num[j]<=n ;++j )
        {
            is_prime[i*prime_num[j]]=0;
            if (i%prime_num[j]==0)
            {
                break;
            }
        }
    }
}
int main_1013()
{
    eulurSeive(maxn);
    LL N,M;
    scanf("%lld%lld",&N,&M);
    for (LL i=N;i<M ;++i )
    {
        if ((i-N+1)%10==0)
        {
            printf("%lld\n",prime_num[i]);
            continue;
        }
        printf("%lld ",prime_num[i]);
    }
    printf("%lld",prime_num[M]);
    return 0;
}
